package com.wrx.club_management_backend.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.wrx.club_management_backend.common.CommonEntity;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.List;

@EqualsAndHashCode(callSuper = true)
@Data
@TableName("tb_news")
public class News extends CommonEntity {
    @TableId(type = IdType.AUTO)
   private Long id;

   private Long userId;

   private String nickname;

   private String avatar;

   private String msg;

   private int likes;

   @TableField(exist = false)
   private List<Comment> comments;

}
